package com.wjf.shortlink.admin.common.convention.errorcode;

// 基础错误码定义
public enum BaseErrorCode implements IErrorCode {
    //=======用户注册错误======
    USER_REGISTER_ERROR("A000100", "用户注册错误"),
    USER_NAME_VERIFY_ERROR("A000110", "用户名校验失败"),

    // ========== 一级 系统执行出错 ==========
    SERVICE_ERROR("B000001", "系统执行出错"),
    SERVICE_MISS_REQUEST_VALUE_ERROR("B000002", "参数缺失"),
    // ========== 二级宏观错误码 系统请求操作频繁 ==========
    FLOW_LIMIT_ERROR("A000300", "当前系统繁忙，请稍后再试"),
    ;

    private final String code;
    private final String message;

    BaseErrorCode(String code, final String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
